<h5>Setting up from scratch a new atmega168/328 to use it with Wiring</h5>
<p>This tutorial introduces the setup from scratch of an atmega168/328 DIP package microcontroller on a breadboard and an FTDI USB breakout board (Sparkfun) to use it with Wiring. It assumes the bootloader is already loaded into the DIP part. Check out this tutorial to <a href="../atmegaDIPbootloader">burn a bootloader into a brand new DIP part</a>.</p>
<h5>Step 1</h5>
<p>Setup the basic circuit to use the atmega168/328 and the FTDI USB Serial FT232R breakout board.</p>
<p><img src="imgs/atmega168-328USB.png" width="734" height="893" /></p>
<p>Note how the Blink LED and its resistor r2 are optional, they are useful for you to play later with the Blink example.</p>
<p>The Pulse switch is also optional, it is a manual reset for your microcontroller.</p>
<p>The atmega168/328 can be used at 16Mhz requiring the XTAL and the two capacitors C1 and C2, we used (10 1KV) value for C1 and C2 and worked very well although the datasheet recommends to use 22pF for C1 and C2.</p>
<p>Capacitor C3 is optional and it used to set the auto reset feature for your DIP part atmega168/328, otherwise you'll have to do a manual reset when uploading a new program and to restart when the new program is loaded.</p>
<p>Power is directly provided by the USB Serial breakout board VCC and GND lines to the rest of the circuit.</p>
<h5>Step 2</h5>
<p>Select the appropriate microcontroller you are going to use, for the purpose of this tutorial we used an atmega168 part @ 16 MHz, in the menu Tools &raquo; Board &raquo; Atmel &raquo; ATmega168 @ 16Mhz (crystal). If you are using a different DIP part select the one you have at the right speed.</p>
<h5>Step 3</h5>
<p>Select the appropriate Serial port for your USB Serial FTDI breakout, for our setup the port selected in the menu was Tools &raquo; Serial Port &raquo; /dev/tty.usbserial-A400f7EN, find the right one for your breakout board or cable.</p>
<h5>Step 4</h5>
<p>Load the Blink example sketch located in the menu Help &raquo; Examples &raquo; Basics &raquo; 1.Getting Started &raquo; Blink</p>
<h5>Step 5 </h5>
<p>Upload the sketch into your new scratch &quot;board&quot; pressing the Upload button on the main toolbar. Happy Wiring!!</p>
<p>&nbsp;</p>
